Skip to content

Instantly share code, notes, and snippets.

@strengejacke
strengejacke / .lintr
Last active May 8, 2024 17:39
VS Code setup for R
// save to windows-user directory
linters: with_defaults(object_name_linter = NULL,
object_length_linter(50),
commented_code_linter = NULL,
object_usage_linter = NULL,
line_length_linter(120),
cyclocomp_linter = cyclocomp_linter(50))
@chetan
chetan / dumpcerts.traefik.v2.sh
Created November 9, 2023 16:24
Convert traefik acme.json to PEM files
#!/usr/bin/env bash
# Copyright (c) 2017 Brian 'redbeard' Harrington <redbeard@dead-city.org>
#
# dumpcerts.sh - A simple utility to explode a Traefik acme.json file into a
# directory of certificates and a private key
#
# Usage - dumpcerts.sh /etc/traefik/acme.json /etc/ssl/
#
# Dependencies -
# util-linux
%Categorias
categoria(fantasia).
categoria(novela).
categoria(ciencia_ficcion).
categoria(misterio).
categoria(poemas).
categoria(historia).
categoria(autoayuda).
categoria(romance).
categoria(aventura).
@christech1117
christech1117 / Markdown教學.md
Last active May 8, 2024 17:37
Markdown教學,每個部分的教學分為兩個區塊,上半部為markdown語法,下半部為顯示結果
@kueda
kueda / d3.phylogram.js
Last active May 8, 2024 17:33
Right-angle phylograms and circular dendrograms with d3. To preview see http://bl.ocks.org/kueda/1036776
/*
d3.phylogram.js
Wrapper around a d3-based phylogram (tree where branch lengths are scaled)
Also includes a radial dendrogram visualization (branch lengths not scaled)
along with some helper methods for building angled-branch trees.
Copyright (c) 2013, Ken-ichi Ueda
All rights reserved.
@chranderson
chranderson / nvmCommands.js
Last active May 8, 2024 17:29
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@mattbell87
mattbell87 / remote-wsl.md
Last active May 8, 2024 17:26
VSCode Remote: Connect to WSL2 from another machine

VSCode Remote: Connect to WSL2 from another machine

Do you want to do remote development on your WSL2 container in Visual Studio Code? Read this.

Proxy jump method

  1. On the host set up OpenSSH for Windows
  2. Run wsl --update to make sure you are running the latest WSL
  3. Open WSL and install another SSH server inside WSL with sudo apt-get install openssh-server
  4. Now run sudo systemctl enable --now ssh to automatically start ssh when WSL starts.
@xputerax
xputerax / cheatsheet.yml
Created June 8, 2019 09:45
YAML cheat sheet
# YAML cheat sheet
# Reference: https://www.youtube.com/watch?v=cdLNKUoMc6c
# object
person:
# string value. single/double quotes
# anchoring
name: &name "daniel" # anchor name doesn't have to be the same as key name
occupation: 'student'
# As of SQL 2017
/Record @id @type @time
/Record/ConnectivityTraceRecord/ClientConnectionId
/Record/ConnectivityTraceRecord/IsClient
/Record/ConnectivityTraceRecord/LocalHost
/Record/ConnectivityTraceRecord/LocalPort
/Record/ConnectivityTraceRecord/OSError
/Record/ConnectivityTraceRecord/RecordSource
/Record/ConnectivityTraceRecord/RecordTime
@wmedlar
wmedlar / Pseudopotential-Derived Band Structure of Silicon.ipynb
Last active May 8, 2024 17:21
The band structure of Silicon is calculated using the empirical pseudopotential method implemented in the Python programming language. A generalized routine is able to calculate the band structure of diamond and zincblende lattices. The energy splittings for Silicon at symmetry points appear to be very accurate with accepted values by diagonaliz…
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.